package com.zm.exercise.day05;

import java.text.SimpleDateFormat;
import java.time.LocalDate;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.util.Calendar;
import java.util.Date;

/**
 * @Author:Domen
 * @Date:2024/7/18 9:32
 */

public class ThreadLocalTest {
    public static void main(String[] args) {
        Date date = new Date();

        System.out.println(date.getTime());

        Calendar calendar = Calendar.getInstance();
        System.out.println(calendar.get(Calendar.YEAR));

        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        // 1、普通的时间转换
        String string = new SimpleDateFormat("yyyy-MM-dd").format(new Date()).toString();
        System.out.println(string);

        System.out.println(new Date());

    }
}
